package com.budee.boke.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.budee.boke.dao.ArticleMapper;
import com.budee.boke.model.Article;
import com.budee.boke.model.Pager;
import com.budee.boke.service.ArticleService;
@Service
public class ArticleServiceImpl implements ArticleService {
	@Autowired
	private ArticleMapper articleDao;
	
	public void add(Article article) {
		articleDao.insert(article);
	}

	public void update(Article article) {
		articleDao.updateByPrimaryKey(article);
	}

	public void delete(int id) {	
		articleDao.deleteByPrimaryKey(id);
	}

	public Article find(int id) {
		
		return articleDao.selectByPrimaryKey(id);
	}

	public List<Article> list() {
		
		return articleDao.list();
	}

	public List<Article> listAriticle(Map<String, Object> map) {
		return articleDao.listAriticle(map);	
	}

	public Pager<Article> pageArticle(Map<String, Object> map1) {
		Pager<Article> pa = new Pager<Article>();
	
		return pa;
	}

}
